<?php
/**
 * Created by PhpStorm.
 * User: godjarvis
 * Date: 2020/08/06
 * Time: 09:39
 */

namespace App\Model\Dao\DangKou;

use App\Model\Entity\DangKou\TaosiFrontPropValues;
use Fresh\Annotation\ConnectionField;
use Fresh\Mvc\Model\Dao;

class TaosiFrontPropDao extends Dao
{
    /**
     * @ConnectionField(name="dangkou")
     */
    public function getPropValues($pid)
    {
        return $this->expr()
            ->from(TaosiFrontPropValues::class)
            ->where('front_prop_id=?', $pid)
            ->where('status=0')
            ->field('id as vid, name as vname')
            ->orderBy('sort_order')
            ->query()
            ->find();
    }
}
